package com.suyi.controller;


import com.suyi.domain.CommonResult;
import com.suyi.domain.TOrder;
import com.suyi.service.TOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 贺袁晨
 * @since 2021-04-26
 */
@RestController
public class TOrderController {

    @Autowired
    private TOrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(TOrder order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}

